var order = []
Page({
  data: {
    toView: 'red',
    scrollTop: 100
  },
  upper: function (e) {
    console.log(e)
  },
  lower: function (e) {
    console.log(e)
  },
  scroll: function (e) {
    console.log(e)
  },
  tap: function (e) {
    for (var i = 0; i < order.length; ++i) {
      if (order[i] === this.data.toView) {
        this.setData({
          toView: order[i + 1]
        })
        break
      }
    }
  },
  tapMove: function (e) {
    this.setData({
      scrollTop: this.data.scrollTop + 10
    })
  },
  // 生命周期
  //页面加载
  // onLoad:function(){
  //   console.log(wx.getStorageSync("cateId"))
  // },
// 页面卸载，加载完毕
  // onUnlond:function(){
  //   wx.removeStorage({
  //     key:"cateId"
  //   })
  // },
  // 数据重新加载
  onShow:function(){
    console.log(wx.getStorageSync("cateId"))
  }
})